from girls.models import Girl
from girls.models import Service
from django.contrib import admin
#class ServiceInline(admin.StackedInline):
#    model = Service
#    extra = 1

class GirlAdmin(admin.ModelAdmin):
    fieldsets = [
        (None,               {'fields': ['name']}),
        ('Looks', {'fields': ['hair_colour', 'eyes_colour', 'height', 'weight'], 'classes': ['collapse']}),
        ('Rating', {'fields': ['rating', 'price_h']})
    ]
#    inlines = [ServiceInline]
    list_filter = ['name']
    search_fields = ['name']

class ServiceAdmin(admin.ModelAdmin):
    fieldsets = [
        (None,               {'fields': ['name']}),
        ('Girls', {'fields': ['girls_id', 'text', 'price', 'duration_m'], 'classes': ['collapse']}),
        ('Status', {'fields': ['status_id'], 'classes': ['collapse']})
    ]
#    inlines = [ServiceInline]
    list_filter = ['name']
    search_fields = ['name']
admin.site.register(Service, ServiceAdmin)

admin.site.register(Girl, GirlAdmin)

